#ifndef INDEXPARSER_H_
#define INDEXPARSER_H_

#include "IndexTable.h"
#include "WordCounterTable.h"
#include <fstream>
#include <map>
#include <string>

class IndexParser
{
public:
	IndexParser();
	virtual ~IndexParser();
	static void getTextFromPage(std::string filename,std::string fileID);
	static void getWordsFromText(std::ifstream *file,IndexTable* index);
	static void getIndexTableSize(std::ifstream *file,WordCounterTable* wordCounter);
	static void fillConvMap();
private:
	static void getWordsFromPage(std::ifstream* file, IndexTable* index, std::string doc);
	static void countWordsFromPage(std::ifstream *file,WordCounterTable* wordCounter,std::string doc);
	static std::string ToLower(const std::string *word);
	static bool ehPalavra(std::string *word);
	static std::map<std::string,std::string> mapaConv;
};

#endif /*INDEXPARSER_H_*/
